.autocomplete {
  position: relative;

  input {
    padding: 6px 11px;
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    font-size: 16px;
    line-height: 1.5715;
    color: #333;
    outline: none;
    width: 195px;
    &:focus {
      border-color: #1890ff;
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }
  }

  .loading {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    padding: 8px;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-top: none;
    border-radius: 0 0 4px 4px;
  }

  .error {
    width: 200px;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 172px;
    padding: 8px;
    background-color: #fff1f0;
    border: 1px solid #ffa39e;
    border-top: none;
    border-radius: 0 0 4px 4px;
    color: #f5222d;
  }

  .options {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 172px;
    max-height: 200px;
    padding: 8px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-top: none;
    border-radius: 0 0 4px 4px;
    width: 200px;
    animation: fade-in 0.8s ease-in-out forwards;
    .option {
      padding: 8px;
      cursor: pointer;
      transition: background-color 0.3s;
      animation: fade-in 0.5s ease-in-out forwards;
      &:hover {
        background-color: #f5f5f5;
      }
    }
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
